/**============================================================================
 Confidential Information - Limited distribution to authorized persons only.
 This software is protected as an unpublished work under the U.S. Copyright
 Act of 1976.

 Copyright (c) 2011, BluePhoenix Solutions, Inc. All rights reserved.
 ----------------------------------------------------------------------------
 file......: IconManager.java
 Author....: Vyacheslav Kovalyov
 Created...: 22.10.11

 Description:

 ============================================================================*/
package ru.monyag.pred.swing.util;

import javax.swing.*;
import java.util.HashMap;
import java.util.Map;

import static ru.monyag.pred.swing.util.PredSwingConstants.*;

/**
 * @author Vyacheslav Kovalyov
 * @version 1.0
 */
public class IconManager {

    private static final Map<String, Icon> icons = new HashMap<String, Icon>();

    private static final String ICONS = "icons/";
    private static final String ICONS_32 = ICONS + "32/";

    static {
        icons.put(NOTEPAD_ICON, new ImageIcon(ICONS + "notepad.png"));
        icons.put(DELETE_ICON, new ImageIcon(ICONS_32 + "delete.png"));
        icons.put(ADD_ICON, new ImageIcon(ICONS_32 + "add.png"));
        icons.put(APPLY_ICON, new ImageIcon(ICONS_32 + "apply.png"));
        icons.put(CANCEL_ICON, new ImageIcon(ICONS_32 + "cancel.png"));
        icons.put(CLOUD_ICON, new ImageIcon(ICONS_32 + "cloud.png"));
    }

    public static Icon getIcon(String key) {
        return icons.get(key);
    }
}
